home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / net_info / fsc-0081.l01 / PKT3STR.H < prev    next >
Text File  |  1995-03-01  |  6KB  |  143 lines

  1. /* Structures for TYPE-3 in C */
  2.  
  3. /* You may have to change the order of the components in the bitfields */
  4. /* You probably have to if using a Motorola CPU, this is for Intel */
  5.  
  6. typedef unsigned char   Byte;
  7. typedef unsigned short  Word;
  8. typedef unsigned long   Longword;
  9.  
  10. typedef struct
  11. {
  12.     Word    Zone;       /* Zone address */
  13.     Word    Net;        /* Net address */
  14.     Word    Node;       /* Node address */
  15.     Word    Point;      /* Point address or 0 if boss */
  16. } TAddress;
  17.  
  18. typedef struct
  19. {
  20.     unsigned    Type2  :1;
  21.     unsigned    Type3  :1;
  22.     unsigned    Type4  :1;
  23.     unsigned    Type5  :1;
  24.     unsigned    Type6  :1;
  25.     unsigned    Type7  :1;
  26.     unsigned    Type8  :1;
  27.     unsigned    Type9  :1;
  28.     unsigned    Type10 :1;
  29.     unsigned    Type11 :1;
  30.     unsigned    Type12 :1;
  31.     unsigned    Type13 :1;
  32.     unsigned    Type14 :1;
  33.     unsigned    Type15 :1;
  34.     unsigned    Type16 :1;
  35.     unsigned    RFC822 :1;
  36. } CapabilityWord;
  37.  
  38. typedef Longword    TTimeStamp;
  39.  
  40. typedef struct
  41. {
  42.     unsigned    Pvt        :1;   /* Private message */
  43.     unsigned    FileAttach :1;   /* File attach message */
  44.     unsigned    FileReq    :1;   /* File request message */
  45.     unsigned    UpdReq     :1;   /* File update request message */
  46.     unsigned    Direct     :1;   /* Do not route this message */
  47.     unsigned    Crash      :1;   /* High-priority mail */
  48.     unsigned    Hold       :1;   /* Hold for pickup */
  49.     unsigned    IMM        :1;   /* Immediate mail */
  50.     unsigned    RRQ        :1;   /* Return receipt request */
  51.     unsigned    CRQ        :1;   /* Confirm receipt request */
  52.     unsigned    IRR        :1;   /* Is return receipt */
  53.     unsigned    Machine    :1;   /* Message to a program */
  54.     unsigned    NoForCC    :1;   /* CC in NetMail, NoForward in EchoMail */
  55.     unsigned    Permanent  :1;   /* Message should not be pruged by age */
  56.     unsigned    Foreign    :1;   /* Message is from other organization */
  57.     unsigned    reserved15 :1;    /* Reserved for future extension */
  58. } TMsgFlags;
  59.  
  60. typedef struct
  61. {
  62.     unsigned    Local     :1;   /* Message is created localy */
  63.     unsigned    InTransit :1;   /* Message is not destinated for this system */
  64.     unsigned    Orphan    :1;   /* Unknown destination */
  65.     unsigned    KillSent  :1;   /* Remove message after it has been sent */
  66.     unsigned    DelSent   :1;   /* Delete attached file(s) after have been sent */
  67.     unsigned    TruncSent :1;   /* Truncate attached file(s) after have been sent */
  68.     unsigned    Sent      :1;   /* Message has been sent */
  69.     unsigned    IsRead    :1;   /* Message has been read by the SysOp */
  70.     unsigned    Rcvd      :1;   /* Message has been read by its addressee */
  71.     unsigned    LockMsg   :1;   /* Lock the message for further access */
  72.     unsigned    DontSend  :1;   /* Do not send the actual message */
  73.     unsigned    unused11  :1;   /* Reserved for future extension */
  74.     unsigned    unused12  :1;   /* Reserved for future extension */
  75.     unsigned    unused13  :1;   /* Reserved for future extension */
  76.     unsigned    unused14  :1;   /* Reserved for future extension */
  77.     unsigned    unused15  :1;    /* Reserved for future extension */
  78. } TLocalFlags;
  79.  
  80. typedef struct
  81. {
  82.     TAddress       PktOrig;      /* The node who created this packet */
  83.     TAddress       PktDest;      /* The node who should receive this packet */
  84.     Word           SubTupe;      /* Packet contents */
  85.     Word           PktType;      /* Always 3 */
  86.     TTimeStamp     PktDate;      /* When the packet was created */
  87.     Word           ProdCode;     /* FTSC Product Code */
  88.     Byte           MajorVer;     /* Major product version */
  89.     Byte           MinorVer;     /* Minor product version */
  90.     Byte           Org[16];      /* Organization */
  91.     CapabilityWord CapWord;      /* Capability Word */
  92.     Byte           Password[8];  /* Packet password */
  93.     Byte           ExtraInfo[4]; /* Reserved for future extension */
  94. } PKTheader;
  95.  
  96. typedef struct
  97. {
  98.     Word       HeadSize;     /* Size of the message header */
  99.     TMsgFlags  MsgFlags;     /* Message flags */
  100.     TTimeStamp MsgDate;      /* When the message was created */
  101.     Longword   MsgID;        /* Unique message identifier */
  102.     Longword   ReplyID;      /* Reply linkage information */
  103.     Longword   MsgLength;    /* Length of the message in bytes */
  104.     TAddress   MsgOrig;      /* The node who created this message */
  105.     TAddress   MsgDest;      /* The node who should receive this message */
  106.     Byte       CharSet;      /* Character set */
  107.     Byte       MsgType;      /* Type of MsgData */
  108. } PackedMSGheader;
  109.  
  110. typedef struct
  111. {
  112.     TTimeStamp      SRdate;          /* When message was sent/recived */
  113.     TLocalFlags     LocalFlags;      /* Local flags */
  114.     Longword        ReplyTo;         /* Message which this replies */
  115.     Longword        Reply1st;        /* First message which replies to this */
  116.     Longword        ReplyNext;       /* Next reply */
  117.     Word            Cost;            /* In the lowest currency unit */
  118.     PackedMSGheader PMH;             /* Same as packed MSG */
  119. } StoredMSGheader;
  120.  
  121. typedef struct
  122. {
  123.     Word    LastRead;       /* The last message read */
  124.     Word    HighRead;       /* The highest message read */
  125.     Word    HighWater;      /* High-water mark */
  126. } ControlFileStr;
  127.  
  128. /* Text attributes etc */
  129. #define TurnOff     0x03
  130. #define Bold        0x04
  131. #define Italic      0x05
  132. #define Underline   0x06
  133. #define AllCaps     0x17
  134. #define Subscript   0x19
  135. #define Superscript 0x1A
  136. #define Blinking    0x1C
  137. #define Inverted    0x1D
  138. #define Concealed   0x1E
  139. #define Quote       0x1F
  140. #define BinExtShort 0x15
  141. #define BinExtLong  0x00
  142. #define ExtLine     0x01
  143.